package vn.edu.tdt.it.domain;

import java.util.Set;

import de.tudarmstadt.ukp.wikipedia.api.Category;
import de.tudarmstadt.ukp.wikipedia.api.DatabaseConfiguration;
import de.tudarmstadt.ukp.wikipedia.api.Page;
import de.tudarmstadt.ukp.wikipedia.api.Wikipedia;
import de.tudarmstadt.ukp.wikipedia.api.WikiConstants.Language;
import de.tudarmstadt.ukp.wikipedia.api.exception.WikiApiException;

public class Test {
public static void main(String[] args) throws WikiApiException {
	DatabaseConfiguration dbConfig = new DatabaseConfiguration("localhost", "wiki", "root", "", Language.vietnamese);
	Wikipedia wiki = new Wikipedia(dbConfig);
	Category khoahoctunhien = wiki.getCategory("Khoa_học_tự_nhiên");
	Set<Page> pages = khoahoctunhien.getArticles();
	System.out.println(pages.size());
}
}
